'''------------------------------------------------------------------------------------------------
 $ @Author: 杨尚其
 $ @Date: 2021-12-20 22:35:21
 $ @LastEditTime: 2021-12-20 22:36:29
 $ @LastEditors: Please set LastEditors
 $ @Description: 计算单位面积内离散曲线的积分
 $ @FilePath: \YSQTrackerEvaluationToolkit\TOOLS\calculateCurveIntegral.py
--------------------------------------------------------------------------------------------------'''
import numpy as np
'''-------------------------------------------------------------------------------------------
 * @description: 计算单位面积内离散曲线的积分
 * @param {np} ->输入为一个一维的 np.array
 * @return {*} -> float
---------------------------------------------------------------------------------------------'''
def calculateCurveIntegral(curve:np.array)->float:
    return curve.sum()/curve.shape[0]